#闭包

# def func():
#     a = 100
#     b = 99
#
#     def inner_func():
#         print(a,b)
#
#     return inner_func
#
# func()()

# #装饰器
# def de(func):
#
#     a=100
#     def war(*args,**kwargs):
#         print('装修了一下')
#         func(*args,**kwargs)
#         print(func)
#     print(war ,'war')
#     return war
#
# @de
# def house(a,b):
#     print('我是毛坯房')
#
# house('s',{'a':'aaa'})
# print(house)

# def f(func):
#     a = func(1,2)
#     print(a)
#
# f(lambda a,b :a+b)

# list = [{'a':10,'b':20},{'a':67,'b':34},{'a':35,'b':89},{'a':23,'b':45}]
# #
# m = max(list,key=lambda x : x['a'])
# print(m)
#
# list = [1,2,34,6,89,6,53,3,56,22]
#
# from functools import reduce
#
# print(reduce(lambda a, b: a + b, list))

# print(sorted(list, key=lambda x: x['a'],reverse=True))

#map()
#min()
#sorted()
#filter()

